package com.awesome.spring.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * AccountFeign
 *
 * @author alex wu
 * @date 2023/10/13
 */
@FeignClient(value = "seata-saga-account-learn")
public interface AccountFeign {

    @GetMapping("/account/deduct")
    boolean deductAccount(@RequestParam("userId") String userId, @RequestParam("money") int money, @RequestParam("rollback") boolean rollback);

    @GetMapping("/account/compensate/deduct")
    boolean compensateDeductAccount(@RequestParam("userId") String userId, @RequestParam("money") int money);
}
